<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center balance_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub balance_fd0_0'>
					<view class='flex flex-wrap align-center balance_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  balance_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='balance_fd0_0_c1_c0'>余额明细</text>
						<image class='balance_fd0_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"151.png"' @tap.stop="popupShow1716535384940 = true"></image>
					</view>
					<view class='flex flex-wrap align-center justify-end balance_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction align-stretch benben-flex-layout">
				<view>
					<benben-flex-tabs class-name='balance_benbenTabsfd1_0' v-model="tabs" ref="benben_tabsfd1_0"
						select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false'
						:open-sticky='true' :top='88' :is-show-content='false' :scrollspy='false'
						:tabs-info.sync="tabsInfofd1_0" @change="getListFunc()">

						<scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
							class="benben-tabs" style="width:750rpx" :scroll-x="true"
							:scroll-left.sync="tabsInfofd1_0.moveX" scroll-with-animation="all .3s ease">
							<view class="benben-tabs-content" id="benben_tabsfd1_0-content">
								<view id="benben_tabsfd1_0-title" class="benben-tabs-title flex align-center flex ">
									<view
										:class="{ 'checkTitlefd1_0': tabs == '0', 'flex flex-wrap align-center balance_titlefd1_0_c3': true }"
										@tap="tabs = '0'" :id="`benben_tabsfd1_0-title-item-${'0'}`">

										<text>全部</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '1', 'flex flex-wrap align-center balance_titlefd1_0_c4': true }"
										@tap="tabs = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">

										<text>收入记录</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '2', 'flex flex-wrap align-center balance_titlefd1_0_c4': true }"
										@tap="tabs = '2'" :id="`benben_tabsfd1_0-title-item-${'2'}`">

										<text>支出记录</text>

									</view>
								</view>
								<view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
									id="benben_tabsfd1_0-line"
									class="benben-tabs-line flex benben-flex-tabs-line balance_linefd1_0"></view>
							</view>
						</scroll-view>

						<!--     <view   class='flex flex-wrap align-center balance_rightfd1_0_c0'   @tap.stop="popupShow1716535384940=true"   >
        </view>
 -->
					</benben-flex-tabs>

				</view>
				<view class='flex flex-direction align-stretch balance_fd1_1'>
					
					<view class="flex yangshi" v-if="time_end">
						日期：{{time_start}}-{{time_end}}
						<image class='yangshi_1' @tap.stop="qingkong" mode="aspectFit" :src='STATIC_URL+"48.png"'></image>
					</view>
					<template v-for='(item,key0) in dataMessage'>
						<view class='flex flex-direction align-stretch balance_fd1_1_c0' @tap.stop="chakan(item)">
							<view class='flex flex-wrap align-center'>
								<view class='flex flex-direction flex-wrap align-stretch flex-sub'>
									<text class='balance_fd1_1_c0_c0_c0_c0'>{{item.remark}}</text>
									<!-- <text class='balance_fd1_1_c0_c0_c0_c1'>{{item.create_time}}</text> -->
								</view>
								<view class='flex flex-wrap align-center balance_fd1_1_c0_c0_c1'>
									<!-- <text class='balance_fd1_1_c0_c0_c1_c0' v-if="item.money_type=='1'">+</text> -->
									<text class='balance_fd1_1_c0_c0_c1_c1'
										v-if="item.money_type=='1'">{{item.change_money}}</text><text
										class='balance_fd1_1_c0_c0_c1_c1_1'
										v-if="item.money_type=='2'">{{item.change_money}}</text>
								</view>
							</view>
							<view class='flex flex-wrap align-center balance_fd1_1_c0_c1'>
								<text class='balance_fd1_1_c0_c1_c0'>{{item.create_time}}</text>
								<view class='balance_fd1_1_c0_c1_c1'>
									<text class='balance_fd1_1_c0_c1_c1_c0' v-if="item.check_status=='1'">审核中</text>
									<text class='balance_fd1_1_c0_c1_c1_c02' v-if="item.check_status=='2'">审核驳回</text>
									<text class='balance_fd1_1_c0_c1_c1_c01' v-if="item.check_status=='3'">已到账</text>
									<text class='balance_fd1_1_c0_c1_c1_c1' v-if="item.change_type == 2 || item.change_type == 5 || item.change_type == 6">详情 ></text>
								</view>
							</view>
						</view>
					</template>
					<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
						:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<benben-popup v-model="popupShow1716535384940" :mask="true" :mask-close-able="true" mode='center'>
				<!---flex布局flex布局开始-->
				<view class="flex benben-flex-layout flex-wrap align-center">
					<benben-calendar-diy mode='range' year-arrow-color='#BFBFBF' month-arrow-color='#BFBFBF'
						start-text=' ' end-text=' ' active-bg-color='rgba(0, 119, 255, 1)'
						range-bg-color='rgba(0, 119, 255, 0.1)' :change-title='true' :change-year='true'
						:change-month='true' class='balance_fd2_0' @change="getListFunc()" :start-time.sync="time_start"
						:end-time.sync="time_end"></benben-calendar-diy>
				</view>

				<!---flex布局flex布局结束-->

			</benben-popup>


		</view>
	</page-body>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"popupShow1716535384940": false,
				"tabsInfofd1_0": {
					lineleft: '',
					lineWidth: '',
					moveX: 0,
					scrollX: 0,
					PageScrollX: 0
				},
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"time_start": "",
				"tabs": "0",
				"time_end": "",
				"dataMessage": []
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			this.getListFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			chakan(item){
				if(item.change_type=='5' || item.change_type=='6'){
					this.$urouter.navigateTo(`/pages/riderOrder/meetOrder/meetOrder?order_sn=${item.order_sn}&type=${item.change_type=='5' ? '1' : ''}&aid=${item.order_id}`);
				}else if(item.change_type=='2'){
					this.$urouter.navigateTo(`/pages/riderMy/expenditur/expenditur?order_sn=${item.order_sn}`);
					
				}
			},
			qingkong(){
				this.time_start = ''
				this.time_end = ''
				this.getListFunc()
			},
			//钱包-余额明细
			getListFunc() {
				this.minixPagingListsApi = global.apiUrls.post636dfee37deef;
				this.pageingListApiMethod = 'get';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					create_time: this.time_start,
					money_type: this.tabs,
					end_time: this.time_end,
					user_role: uni.getStorageSync('tabberType') || 1
				}
				this.listData = [];
				this.dataMessage = this.listData;
				this.pagingListToggle();

				this.popupShow1716535384940 = false;
			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;
	}

	.balance_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.balance_fd0_0_c1_c1 {
		width: 36rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 8rpx 0 0 10rpx;
	}

	.balance_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: #333333;
		line-height: 50rpx;
	}

	.balance_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.balance_fd0_0_c0 {
		width: 120rpx;
	}

	.balance_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.balance_fd1_1_c0_c1_c1_c1 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.balance_fd1_1_c0_c1_c1_c0 {
		color: #000;
		font-size: 22rpx;
		font-weight: 500;
		margin: 0rpx 12rpx 0rpx 0rpx;
	}
	.balance_fd1_1_c0_c1_c1_c01 {
		color: #34BB34;
		font-size: 22rpx;
		font-weight: 500;
		margin: 0rpx 12rpx 0rpx 0rpx;
	}
	.balance_fd1_1_c0_c1_c1_c02 {
		color: red;
		font-size: 22rpx;
		font-weight: 500;
		margin: 0rpx 12rpx 0rpx 0rpx;
	}

	.balance_fd1_1_c0_c1_c1 {
		margin: 0rpx 0rpx 0rpx auto;
	}

	.balance_fd1_1_c0_c1_c0 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
	}

	.balance_fd1_1_c0_c1 {
		margin: 32rpx 0rpx 0rpx 0rpx;
	}

	.balance_fd1_1_c0_c0_c1_c1_1 {
		padding: 0rpx 5rpx 0rpx 0rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: var(--benbenFontColor0);
	}

	.balance_fd1_1_c0_c0_c1_c1 {
		padding: 0rpx 5rpx 0rpx 0rpx;
		font-size: 28rpx;
		font-weight: 700;
		color: #DA372C;
	}

	.balance_fd1_1_c0_c0_c1_c0 {
		font-size: 28rpx;
		font-weight: 700;
		color: #DA372C;
		margin: 0rpx 5rpx 0rpx 0rpx;
	}

	.balance_fd1_1_c0_c0_c1 {
		color: #DA372C;
		font-weight: 700;
		font-size: 28rpx;
	}

	.balance_fd1_1_c0_c0_c0_c1 {
		font-size: 24rpx;
		font-weight: 400;
		color: #333333;
		margin: 8rpx 0rpx 0rpx 0rpx;
	}

	.balance_fd1_1_c0_c0_c0_c0 {
		font-size: 32rpx;
		font-weight: 400;
		color: #333333;
		padding: 0rpx 24rpx 0rpx 0rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.balance_fd1_1_c0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.balance_fd1_1 {
		background: var(--benbenbgColor1);
		background-size: 100% auto;
		margin: 20rpx 0rpx 0rpx 0rpx;
	}

	.balance_titlefd1_0_c4 {
		margin: 0rpx 47rpx 0rpx 47rpx;
	}

	.balance_titlefd1_0_c3 {
		margin: 0rpx 47rpx 0rpx 56rpx;
	}

	.balance_linefd1_0 {
		// background: var(--benbenbgColor0);
		// background: url(image-path('52.png')) no-repeat;
		// background-size: 100% 100%;
		// width: 32rpx;
		// height: 10rpx;
		// top: 85rpx;
		// background-size: 100% auto !important;
		background:url(image-path('52.png')) no-repeat;
		width:32rpx;height:12rpx;
		top:70rpx;
		background-size:100% auto !important;
	}

	.balance_rightfd1_0_c0 {
		width: 100rpx;
		height: 100%;
	}

	.checkTitlefd1_0 {
		font-weight: 700 !important;
		font-size: 32rpx !important;
		// color: rgba(0, 119, 255, 1) !important;
		background-color: rgba(255, 255, 255, 1) !important;
	}

	::v-deep .balance_benbenTabsfd1_0 {
		background: #fff;
		width: 750rpx;
		height: 94rpx;
		white-space: nowrap;
		text-align: center;
		font-size: 32rpx;
		font-weight: 400;
		color: rgba(102, 102, 102, 1);
	}

	.balance_fd2_0 {
		background: #ffffff;
		width: 622rpx;
		border-radius: 24rpx;
		padding: 12rpx 012rpx 012rpx 012rpx;
	}
	.yangshi{
		padding: 32rpx 0 0 32rpx;
	}
	.yangshi_1{
		width: 32rpx;
		height: 32rpx;
		margin: 6rpx 0 0 34rpx;
	}
</style>
